package cn.edu.scau.cmi.wujingxuan.Factory.AbstractFactory;

public abstract class BuildingFactory
{
	public static final String PINGAN = "PingAn";
	public static final String PICC = "PICC";

	public abstract BodyInjury getBodyInjury();

	public abstract CarDamage getCarDamage();

	public abstract Casualty getCasualty();

	public abstract Accident getAccident();

	public static BuildingFactory getBuildingFactory(String type)
	{
		BuildingFactory bf = null;
		if (type.equals(BuildingFactory.PINGAN))
		{
			bf = new PingAnBuildingFactory();
		} else if (type.equals(BuildingFactory.PICC))
		{
			bf = new PICCBuildingFactory();
		}
		return bf;
	}

}